<template>
	<view style="display: flex;justify-content: space-between;padding: 20rpx;line-height: 56rpx;
			background: #FFFBF6;
			box-shadow: 0rpx 8rpx 7rpx 3rpx #FFFBF6;
			border-radius: 20rpx;">
		<view>
			<view style="font-weight: bold;">平均处理时长</view>
			<label style="color: #FF6C00;font-size: 40rpx;font-weight: bold;margin-right: 10rpx;">{{time}}</label> 小时
			<view style="display: flex;align-items: center;"> <label v-if="timeCompare>=0">上升</label><label
					v-else>下降</label>
				<label
					:style="{color:timeCompare>=0?'#FF5400':'#47B452'}">{{timeCompare>0?timeCompare:timeCompare*-1}}</label>小时
				<image v-if="timeCompare>=0" src="../../static/images/newIcon/up.png"
					style="width: 36rpx;height: 36rpx;" mode=""></image>
				<image v-else src="../../static/images/newIcon/down.png" style="width: 36rpx;height: 36rpx;" mode="">
				</image>
			</view>
		</view>
		<view>
			<view style="font-weight: bold;">平均评价分</view>
			<label style="color: #FF6C00;font-size: 40rpx;font-weight: bold;margin-right: 10rpx">{{score}}</label> 分
			<view style="display: flex;align-items: center;"><label v-if="scoreCompare>=0">上升</label><label
					v-else>下降</label><label
					:style="{color:scoreCompare>=0?'#FF5400':'#47B452'}">{{scoreCompare>0?scoreCompare:scoreCompare*-1}}</label>分
				<image v-if="scoreCompare>=0" src="../../static/images/newIcon/up.png"
					style="width: 36rpx;height: 36rpx;" mode=""></image>
				<image v-else src="../../static/images/newIcon/down.png" style="width: 36rpx;height: 36rpx;" mode="">
				</image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				time: 0,
				timeCompare: 0,
				score: 0,
				scoreCompare: 0,
			};
		},
		mounted() {
			if (uni.getStorageSync('projId') == 159) {
				this.time = 4.22;
				this.lastWeekTime = 4.41;
				this.timeCompare = (this.time - this.lastWeekTime).toFixed(2);
				this.score = 4.48;
				this.lastWeekScore = 4.42;
				this.scoreCompare = (this.score - this.lastWeekScore).toFixed(2);
			}
			if (uni.getStorageSync('projId') == 208) {
				this.time = 4.34;
				this.lastWeekTime = 4.53;
				this.timeCompare = (this.time - this.lastWeekTime).toFixed(2);
				this.score = 4.43;
				this.lastWeekScore = 4.41;
				this.scoreCompare = (this.score - this.lastWeekScore).toFixed(2);
			}
		},
	};
</script>

<style>
</style>
